package com.lulu.baselib.util;

import io.reactivex.Observable;
import io.reactivex.android.schedulers.AndroidSchedulers;
import io.reactivex.schedulers.Schedulers;

/**
 * Author: XuChang
 * Date: 2019/10/26 10:50
 * Email: 123286473@qq.com
 * Description:rx线程处理类
 * History:
 */
public class SchedulerUtil {


    public static <T> Observable<T> addSchedule(Observable<T> observable) {
        return observable.subscribeOn(Schedulers.newThread())
                .observeOn(AndroidSchedulers.mainThread());
    }
}
